package com.school.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.github.pagehelper.PageHelper;
import com.school.mapper.GradeMapper;
import com.school.pojo.Grade;
import com.school.service.GradeService;

@Service
@Transactional
public class GradeServiceImpl implements GradeService{
	@Autowired
	private GradeMapper gradeMapper;
	
	@Override
	public List<Grade> findAll(int page, int pageSize, Grade t) {
		PageHelper.startPage(page,pageSize);
		return gradeMapper.findAll(t);
	}

	@Override
	public int add(Grade t) {
		
		return gradeMapper.add(t);
	}

	@Override
	public int delbatch(int[] id) {
		
		return gradeMapper.delbatch(id);
	}

	@Override
	public Grade findbyId(int grade_id) {
		
		return gradeMapper.findbyId(grade_id);
	}

	@Override
	public int edit(Grade t) {
		
		return gradeMapper.edit(t);
	}

}
